package com.zkzx.wlhy.adaptor.clinet.company;

import com.zkzx.wlhy.adaptor.clinet.ResultVO;
import com.zkzx.wlhy.adaptor.config.feign.FeignConfiguration;
import com.zkzx.wlhy.adaptor.controller.company.param.CompanyDTO;
import com.zkzx.wlhy.adaptor.controller.company.vo.WlhyCompanyVO;
import com.zkzx.wlhy.adaptor.controller.company.vo.WlhyContractVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * 北京中科智兴物联科技有限公司 @版权所有
 *
 * @Author: zhaoyihe@zkraising.com
 * @Date: 2021/05/19/19:17
 * @Description:
 */
@FeignClient(name = "WLHY-COMPANY",url = "${wh.website}",configuration = FeignConfiguration.class)
public interface CompanyClient {

    @GetMapping("/push/company/getCompany")
    ResultVO<WlhyCompanyVO> getCompany(@RequestParam("companyName") String companyName, @RequestParam("creditCode") String creditCode);

    @PostMapping("/push/company/add")
    ResultVO add(@RequestBody @Valid CompanyDTO companyDTO);

    @GetMapping("/push/company/getCompanyState")
    ResultVO getStatus(@RequestParam("id") String id);

    @PostMapping("/push/contract/addCompanyContract")
    ResultVO<String> getContract(@RequestBody @Valid WlhyContractVO wlhyContractVO);


}
